/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JDialogConclusion.java
 *
 * Created on 01/07/2010, 23:01:21
 */

package systole.view.crud.conclusion;

import org.jdesktop.application.Action;

/**
 *
 * @author jmj
 */
public class JDialogConclusion extends javax.swing.JDialog {

    /**
	 * 
	 */
	private static final long serialVersionUID = 2683357412809651421L;
	private ControllerConclusionEdition controllerConclusionEdition;

    /** Creates new form JDialogConclusion 
     * @param parent 
     * @param controllerConclusionEdition */
    public JDialogConclusion(java.awt.Frame parent, ControllerConclusionEdition controllerConclusionEdition) {
        super(parent, true);
        initComponents();
        this.controllerConclusionEdition=controllerConclusionEdition;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPnlCenter = new javax.swing.JPanel();
        jEdtName = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jEdtConclusion = new javax.swing.JTextArea();
        jLblName = new javax.swing.JLabel();
        jLblConclusion = new javax.swing.JLabel();
        jChkFemale = new javax.swing.JCheckBox();
        jChkMale = new javax.swing.JCheckBox();
        jPnlBottom = new javax.swing.JPanel();
        jBtnOk = new javax.swing.JButton();
        jBtnCancel = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("form"); // NOI18N
        setResizable(false);

        jPnlCenter.setName("jPnlCenter"); // NOI18N
        jPnlCenter.setPreferredSize(new java.awt.Dimension(457, 188));
        jPnlCenter.setRequestFocusEnabled(false);

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(systole.view.SystoleApp.class).getContext().getResourceMap(JDialogConclusion.class);
        jEdtName.setText(resourceMap.getString("jEdtName.text")); // NOI18N
        jEdtName.setToolTipText(resourceMap.getString("jEdtName.toolTipText")); // NOI18N
        jEdtName.setName("jEdtName"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jEdtConclusion.setColumns(20);
        jEdtConclusion.setFont(jEdtConclusion.getFont());
        jEdtConclusion.setLineWrap(true);
        jEdtConclusion.setRows(4);
        jEdtConclusion.setToolTipText(resourceMap.getString("jEdtConclusion.toolTipText")); // NOI18N
        jEdtConclusion.setWrapStyleWord(true);
        jEdtConclusion.setName("jEdtConclusion"); // NOI18N
        jScrollPane1.setViewportView(jEdtConclusion);

        jLblName.setFont(jLblName.getFont().deriveFont(jLblName.getFont().getStyle() | java.awt.Font.BOLD));
        jLblName.setText(resourceMap.getString("jLblName.text")); // NOI18N
        jLblName.setName("jLblName"); // NOI18N

        jLblConclusion.setFont(jLblConclusion.getFont().deriveFont(jLblConclusion.getFont().getStyle() | java.awt.Font.BOLD));
        jLblConclusion.setText(resourceMap.getString("jLblConclusion.text")); // NOI18N
        jLblConclusion.setName("jLblConclusion"); // NOI18N

        jChkFemale.setSelected(true);
        jChkFemale.setText(resourceMap.getString("jChkFemale.text")); // NOI18N
        jChkFemale.setToolTipText(resourceMap.getString("jChkFemale.toolTipText")); // NOI18N
        jChkFemale.setName("jChkFemale"); // NOI18N

        jChkMale.setSelected(true);
        jChkMale.setText(resourceMap.getString("jChkMale.text")); // NOI18N
        jChkMale.setToolTipText(resourceMap.getString("jChkMale.toolTipText")); // NOI18N
        jChkMale.setName("jChkMale"); // NOI18N

        javax.swing.GroupLayout jPnlCenterLayout = new javax.swing.GroupLayout(jPnlCenter);
        jPnlCenter.setLayout(jPnlCenterLayout);
        jPnlCenterLayout.setHorizontalGroup(
            jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPnlCenterLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLblName)
                    .addComponent(jLblConclusion))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jChkMale)
                    .addComponent(jChkFemale)
                    .addComponent(jEdtName)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(48, 48, 48))
        );
        jPnlCenterLayout.setVerticalGroup(
            jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPnlCenterLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jEdtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLblName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jChkFemale)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jChkMale)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPnlCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLblConclusion)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27))
        );

        getContentPane().add(jPnlCenter, java.awt.BorderLayout.CENTER);

        jPnlBottom.setName("jPnlBottom"); // NOI18N
        jPnlBottom.setPreferredSize(new java.awt.Dimension(360, 40));

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(systole.view.SystoleApp.class).getContext().getActionMap(JDialogConclusion.class, this);
        jBtnOk.setAction(actionMap.get("confirm")); // NOI18N
        jBtnOk.setText(resourceMap.getString("jBtnOk.text")); // NOI18N
        jBtnOk.setToolTipText(resourceMap.getString("jBtnOk.toolTipText")); // NOI18N
        jBtnOk.setName("jBtnOk"); // NOI18N
        jPnlBottom.add(jBtnOk);

        jBtnCancel.setAction(actionMap.get("cancel")); // NOI18N
        jBtnCancel.setText(resourceMap.getString("jBtnCancel.text")); // NOI18N
        jBtnCancel.setToolTipText(resourceMap.getString("jBtnCancel.toolTipText")); // NOI18N
        jBtnCancel.setName("jBtnCancel"); // NOI18N
        jPnlBottom.add(jBtnCancel);

        getContentPane().add(jPnlBottom, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * 
     */
    @Action
    public void confirm() {
        this.controllerConclusionEdition.ok();
    }

    /**
     * 
     */
    @Action
    public void cancel() {
        this.controllerConclusionEdition.cancel();
    }

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtnCancel;
    private javax.swing.JButton jBtnOk;
    private javax.swing.JCheckBox jChkFemale;
    private javax.swing.JCheckBox jChkMale;
    private javax.swing.JTextArea jEdtConclusion;
    private javax.swing.JTextField jEdtName;
    private javax.swing.JLabel jLblConclusion;
    private javax.swing.JLabel jLblName;
    private javax.swing.JPanel jPnlBottom;
    private javax.swing.JPanel jPnlCenter;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the jEdtConclusion
     */
    public javax.swing.JTextArea getjEdtConclusion() {
        return jEdtConclusion;
    }

    /**
     * @return the jEdtName
     */
    public javax.swing.JTextField getjEdtName() {
        return jEdtName;
    }

    /**
     * @return the jChkFemale
     */
    public javax.swing.JCheckBox getjChkFemale() {
        return jChkFemale;
    }

    /**
     * @return the jChkMale
     */
    public javax.swing.JCheckBox getjChkMale() {
        return jChkMale;
    }


    

}
